﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Smile.Network
{
    public class UriArgumentsDictionary : SortedDictionary<string, string>, IUriArgumentsGenerator
    {
        // @Public
        /// <summary>Converts this object to an URL arguments./.</summary>
        ///
        /// <returns>This object as a string.</returns>
        public string ToUriArgumentsString()
        {
            string argumentString = "";

            foreach (var item in this)
            {
                argumentString += item.Key + "=" + item.Value + "&";
            }
            return argumentString.TrimEnd('&');
        }
    }
}
